const API_BASE_URL = require("@/services/baseUrl");
/* eslint-disable */
//跨域代理前缀
// UC常量uc
const API_PROXY_UC_PREFIX = "/uc/api";
// 项目account
const API_PROXY_ACCOUNT_PREFIX = "/uc/api/account";
// 项目enterprise
const API_PROXY_ENTERPRISE_PREFIX = "/uc/api/enterprise";
// 个人信息
const API_PERSONAL_INFORMATION_PREFIX = "/uc/api/user";
// WebSocket
const wsUrl = process.env.VUE_APP_WEBSOCKET_URL
// 项目okr
// const API_PROXY_OKR_PREFIX = "/okr_api";
// 工程机械eop
const API_PROXY_EOP_PREFIX = "/eop/api/poi";
const API_PROXY_EOP = "/eop/api";
// 电子围栏
const API_PROXY_FENCE_PREFIX = "/fleet/fence";
const UC_URL = `${API_BASE_URL}${API_PROXY_UC_PREFIX}`;
const BASE_URL_ACCOUNT = `${API_BASE_URL}${API_PROXY_ACCOUNT_PREFIX}`;
const BASE_URL = `${API_BASE_URL}${API_PROXY_ENTERPRISE_PREFIX}`;
const OKR_URL = process.env.VUE_APP_OKR_URL;
const PERSONAL_URL = `${API_BASE_URL}${API_PERSONAL_INFORMATION_PREFIX}`;
const BASE_URL_FENCE = `${process.env.VUE_APP_API_BASE_URL}${API_PROXY_FENCE_PREFIX}`;
const EOP_URL = `${process.env.VUE_APP_API_GATE_URL}${API_PROXY_EOP_PREFIX}`;
const APP_API_GATEWAY =`${process.env.VUE_APP_API_GATE_URL_EOP}${API_PROXY_EOP}/poi`
const APP_API_GATEWAY_CAR_CODE =`${process.env.VUE_APP_API_GATE_URL_EOP}${API_PROXY_EOP}`
// 未势接口
const VUE_APP_API_GATE_URL_POTENTIAL =  window.fromSystem === 'flxt' && window.location.host.includes("icne.") ?  `${process.env.VUE_APP_API_BASE_URL_OUT}phoenix/report/v1`  : `${process.env.VUE_APP_API_GATE_URL_POTENTIAL}/phoenix/report/v1`
const VUE_APP_API_GATE_URL_PERSSION =  window.fromSystem === 'flxt' && window.location.host.includes("icne.") ?  `${process.env.VUE_APP_API_BASE_URL_OUT}phoenix/api/v1`  : `${process.env.VUE_APP_API_GATE_URL_POTENTIAL}/phoenix/api/v1`
module.exports = {
	wsUrl,
	BASE_URL_FENCE,
	BASE_URL_ACCOUNT,
	BASE_URL,
	UC_URL,
	CAPTCHA_GET_URL: `${UC_URL}/captcha/get`,
  CAPTCHA_CHECK_URL: `${UC_URL}/captcha/check`,
	// 登录 用户中心
	LOGIN: `${UC_URL}/login`,
	// 验证码
	LOGIN_CODE: `${UC_URL}/code/getsms`,
	// 验证码 新
	LOGIN_CODE_NEW: `${UC_URL}/code/getsmsNew`,
	LOGIN_CODE_SMS_NEW: `${UC_URL}/code/getSmsCertificateNew`, // 短信验证码 最新
	// 发送手机验证码的
	PHONE_CODE: `${UC_URL}/code/verificationCode`,
	// 授权码获取token
	ACCESS_TOKEN: `${UC_URL}/accessToken`,
	// 重置密码
	RESET_PASSWORD: `${UC_URL}/resetPassword`,
	// 登出
	LOGOUT: `${UC_URL}/logout`,
	// 获取menu列表
	MENU_LIST: `${BASE_URL_ACCOUNT}/resource/getResourceTree2`,
	// 获取企业
	ENTERPRISE_LIST: `${BASE_URL_ACCOUNT}/enterprise/getEnterprises`,
	// 企业管理
	ENTERPRISE_DETAIL: `${BASE_URL_ACCOUNT}/enterprise/getEnterpriseDetail`,
	// 修改企业
	UPDATE_ENTERPRISE: `${BASE_URL_ACCOUNT}/enterprise/updateEnterprise`,
	// 是否可登录
	ISAVAILABLE_LOGIN: `${BASE_URL_ACCOUNT}/isAvailable`,
	// 企业信息
	BUSINESS_LIST: `${BASE_URL_ACCOUNT}/enterprise/getEnterpriseDetail`,
	SAVE_BUSINESS: `${BASE_URL_ACCOUNT}/enterprise/updateEnterprise`,
	UPLOAD_IMG: `${BASE_URL_ACCOUNT}/upload/uploadFiles`,
	// 组织身份中心
	ROLE_TREE: `${BASE_URL_ACCOUNT}/department/resource/role/get`,
	ALL_ROLE_LIST: `${BASE_URL_ACCOUNT}/role/selectRoleAll`,
	ROLE_LIST: `${BASE_URL_ACCOUNT}/role/selectPageRole`,
	ADD_ROLE: `${BASE_URL_ACCOUNT}/role/addRole`,
	SAVE_ROLE: `${BASE_URL_ACCOUNT}/role/updateRole`,
	DELETE_ROLE: `${BASE_URL_ACCOUNT}/role/deleteRole`,
	// 栏目操作权限
	ROLE_DETAIL: `${BASE_URL_ACCOUNT}/resourceTree/queryRoleResourcesTree`,
	ADD_ROLE_TREE: `${BASE_URL_ACCOUNT}/resourceTree/addRolePermission`,
	// 组织管理
	DEPARTMENT_TREE: `${BASE_URL_ACCOUNT}/department/getDepartmentTree`,
	ADD_DEPARTMENT: `${BASE_URL_ACCOUNT}/department/addDepartment`,
	UPDATE_DEPARTMENT: `${BASE_URL_ACCOUNT}/department/updateDepartment`,
	DELETE_DEPARTMENT: `${BASE_URL_ACCOUNT}/department/deleteDepartment`,
	DEPARTMENT_DETAIL: `${BASE_URL_ACCOUNT}/department/getDepartmentById`,
	RESOURCE_CONFIG: `${VUE_APP_API_GATE_URL_PERSSION}/data/permission/conf/query`,
	UPDATE_PERMISSION: `${VUE_APP_API_GATE_URL_PERSSION}/data/permission/conf/cover`,
	PROJECT_LIST: `${VUE_APP_API_GATE_URL_PERSSION}/admin/vehicle/query/project`,

	USER_DETAIL: `${BASE_URL_ACCOUNT}/user/getUserById`,
	USER_LIST: `${BASE_URL_ACCOUNT}/user/getUsers`,
	UPDATE_USER: `${BASE_URL_ACCOUNT}/user/updateUser`,
	DEL_USER: `${BASE_URL_ACCOUNT}/user/deleteUser`,
	ADD_USER: `${BASE_URL_ACCOUNT}/user/addUser`,

	// 记录列表
	REMOVE_ORG_LIST: `${BASE_URL_ACCOUNT}/department/getDeleteDepartments`,
	REMOVE_ORGANIZER_LIST: `${BASE_URL_ACCOUNT}/user/getDeleteUsers`,
	INVITE_LIST: `${BASE_URL_ACCOUNT}/user/getInvitations`,
	REMOVE_IDENTITY_LIST: `${BASE_URL_ACCOUNT}/role/getDeleteRole`,

	// 通用获取table表格表头信息接口
	COLUMNS_LIST: `${BASE_URL}/pageSet/getPageSetting`,
	SAVE_COLUMNS: `${BASE_URL}/pageSet/savePageField`,
	SAVE_PAGE_SIZE: `${BASE_URL}/pageSet/savePageSize`,

	// 省市区
	AREA_LIST: `${BASE_URL}/region/getRegion`,

	// 数据权限
	GETDEPTROLETREE: `${BASE_URL}/role/getDeptAndRoleTree`,
	SAVEDATAPERMISSION: `${BASE_URL}/role/savaDataPermission`,
	GETDATAPERMISSION: `${BASE_URL}/role/getDataPermission`,
	GETDATAPERMISSIONTREE: `${BASE_URL}/role/getDataPermissionTree`,

	// 数据权限 新 UC2.1
	GET_NEW_DATA_PERMISSION_TREE: `${BASE_URL_ACCOUNT}/permission/permissionList`,
	GET_NEW_DATA_PERMISSION_SUB_TREE: `${BASE_URL_ACCOUNT}/permission/departmentPermissionList`,
	SAVE_NEW_DATA_PERMISSION: `${BASE_URL_ACCOUNT}/permission/addAndUpdatePermission`,
	GET_ACCOUNT_DETAIL_NEW: `${BASE_URL_ACCOUNT}/accountDetail`,

	// 组织分组
	GETGROUP: `${BASE_URL_ACCOUNT}/resourceGroup/getResourceGroupResourceRelation`,
	ADDRESOURCE: `${BASE_URL_ACCOUNT}/resourceGroup/addResourceGroup`,
	// 获取分组下的资源
	GETGROUPDEPT: `${BASE_URL_ACCOUNT}/resourceGroup/getResourceGroupDept`,
	// 修改资源别名
	UPDATERESOURCENAME: `${BASE_URL_ACCOUNT}/resourceGroup/updateResourceGroup`,
	// UC2.1 修改个人信息
	GET_PERSONAL_INFO: `${PERSONAL_URL}/detail`, // 查询外部用户个人信息
	SEND_PERSONAL_INFO_SMS: `${UC_URL}/code/getSmsUpdateUser`, // 个人信息管理中发送验证码使用新的接口
	UPDATE_PERSONAL_INFO_PHONE: `${PERSONAL_URL}/updateUserPhone`, // 修改用手机号
	UPDATE_PERSONAL_INFO_ACCOUNT: `${PERSONAL_URL}/updateUserAccount`, // 修改用户名
	UPDATE_PERSONAL_INFO_EMAIL: `${PERSONAL_URL}/updateUserEmail`, // 修改邮箱
	SEND_PERSONAL_INFO_EMAIL: `${UC_URL}/code/getCodeByEmail`, // 发送邮箱验证码
	UPDATE_PERSONAL_INFO_OTHER: `${PERSONAL_URL}/updateUserName`, // 修改用户名称,昵称等信息
	// okr
  GETOKRTREE: `${OKR_URL}/okr/list`,
  GETOKRVIEW: `${OKR_URL}/okr/view/list`,

  // 全图监控
  CAR_LOCATION_INFO: `${BASE_URL}/monitoring/getAllVehicle`,
  CAR_STRUCTURE: `${BASE_URL}/fullMonitoring/getByDeptCountTree`, // 车辆单位架构
  CAR_ALLVEHICLE: `${BASE_URL}/fullMonitoring/getAllVehicle`, // 车辆查询
  CAR_FULL_GROUPBY: `${BASE_URL}/fullMonitoring/getFullGroupBy`, // 车辆表头分组统计
  MENU_FULL_GROUPBY: `${BASE_URL}/waybills/getWaybillGroupBy/monitor`, // 运单表头分组统计
  FULLMONITOR_FENCELIST: `${BASE_URL_FENCE}/fence/getFenceList`, // 全图监控电子围栏列表

  //轨迹回放
  CAR_TRACK_INFORMATION: `${process.env.VUE_APP_MAP_URL}/track/getHistoryTracks`,
  GETVEHICLETRACE: `${BASE_URL}/operateAnalysis/getVehicleTrace`,
  GEPARKINGPOINT: `${BASE_URL}/operateAnalysis/getParkingAnalysis`,
  GET_CAR_CODE: `${APP_API_GATEWAY_CAR_CODE}/property/carcode`,
  //车辆运行统计 车辆选择的联想
  VEHICLE_TABLE_ASSOCIATION: `${BASE_URL}/dataAnalysis/getCarNums`,

  // 电子围栏
  ADD_CATEGORY: `${APP_API_GATEWAY}/fence/addCategory`, // 新增分类
  ADD_REGION: `${APP_API_GATEWAY}/fence/addRegion`, // 新增区域
  DELETE_CATEGORY: `${APP_API_GATEWAY}/fence/deleteCategory`, // 删除分类
  DELETE_REGION: `${APP_API_GATEWAY}/fence/deleteRegion`, // 删除区域
  CATEGORY_REGION: `${APP_API_GATEWAY}/fence/getCategoryRegion`, // 分类区域搜索
  UPDATE_CATEGORY: `${APP_API_GATEWAY}/fence/updateCategory`, // 修改分类
  UPDATE_REGION: `${APP_API_GATEWAY}/fence/updateRegion`, // 修改区域
  FENCE_TREEDATA: `${APP_API_GATEWAY}/fence/getFenceTree`, // 分类区域树
  FENCEDATA: `${APP_API_GATEWAY}/fence/getFence/{regionId}`,
  FENCE_LIST: `${APP_API_GATEWAY}/fence/getFenceList`,


	// UC添加子应用概念
	QUERY_CLIENT: `${UC_URL}/app/client/query`,
	// 邀请用户(带子应用版)
	ADD_USER_MULTIL: `${BASE_URL_ACCOUNT}/user/addUserMulti`,
	// 查看应用绑定关系
	QUERY_USER_CLIENT: `${BASE_URL_ACCOUNT}/userClient/query`,
	// 新增
	ADD_NEW_INVITE: `${BASE_URL_ACCOUNT}/userClient/add`,
	// 编辑
	EDIT_NEW_INVITE: `${BASE_URL_ACCOUNT}/userClient/update`,
	// 删除
	DELETE_NEW_INVITE: `${BASE_URL_ACCOUNT}/userClient/delete`,



	// 未势单车运行情况  running condition
	RUNNING_CONDITION: `${VUE_APP_API_GATE_URL_POTENTIAL}/singleVehicleBoard/getVehicleBoard`,
	// 未势模糊查询车辆
	SEARCH_CAR:`${VUE_APP_API_GATE_URL_POTENTIAL}/singleVehicleBoard/getVehicleIdentifierList`,
	// 获取经纬度 getLongitudeAndLatitude
	GET_LONGITUDE_AND_LATITUDE: `${VUE_APP_API_GATE_URL_POTENTIAL}/singleVehicleBoard/getCurrentLocation`, 
	// 历史轨迹查询
	GET_HISTORY_TRACE:`${VUE_APP_API_GATE_URL_POTENTIAL}/singleVehicleBoard/getHistoryTrace`,
};
